<div class="bjui-pageHeader">
    <form id="pagerForm" data-toggle="ajaxsearch" action="{:url('Order/index')}" method="post">
        <input type="hidden" name="pageSize" value="{$pageSize}">
        <input type="hidden" name="pageCurrent" value="{$pageCurrent}">
        <input type="hidden" name="orderField" value="{$orderField}">
        <input type="hidden" name="orderDirection" value="{$orderDirection}">
        <div class="bjui-searchBar">
            <label>推广名称：</label><input type="text" value="{$keys.xname|default=''}" name="keys[xname]" class="form-control" size="7">&nbsp;
            <label>姓名：</label><input type="text" value="{$keys.cname|default=''}" name="keys[cname]" class="form-control" size="8">&nbsp;
            <label>手机：</label><input type="text" value="{$keys.telno|default=''}" name="keys[telno]" class="form-control" size="8">&nbsp;
            <label>收货地址：</label><input type="text" value="{$keys.address|default=''}" name="keys[address]" class="form-control" size="8">&nbsp;
            <label>下单时间：</label><input type="text" value="{$keys.addtime|default=''}" name="keys[addtime]" data-toggle="datepicker" class="form-control" size="12">&nbsp;
            <label>员工:</label>
            <select name="keys[mid]" data-toggle="selectpicker" data-size="10" data-width="70">
                <option value="">全部</option>
                {volist name="memArr" id="mem"}
                <option value="{$mem.mid}" {eq name="$mem.mid" value="$keys.mid|default=''"}selected{/eq}>{$mem.nickname}</option>
                {/volist}
            </select>&nbsp;
            <label title="过滤内部测试产生的订单"><input type="checkbox" value="1" name="keys[filter]" data-toggle="icheck" data-label="过滤" {eq name="$keys.filter|default=0" value="1"}checked{/eq}></label>&nbsp;
            <button type="button" class="showMoreSearch" data-toggle="moresearch" data-name="custom"><i class="fa fa-angle-double-down"></i></button>&nbsp;
            <button type="submit" class="btn-default" data-icon="search">查询</button>
            <div class="pull-right">
                <div class="btn-group">
                    <button type="button" class="btn-default dropdown-toggle" data-toggle="dropdown" data-icon="copy">复选框-批量操作<span class="caret"></span></button>
                    <ul class="dropdown-menu right" role="menu">
                        {if authcheck('Admin/Order/del')}
                            <li><a href="{:url('Order/del')}" data-toggle="doajaxchecked" data-confirm-msg="确定要删除选中项吗？" data-reload="true" data-idname="delids" data-group="ids">删除选中</a></li>
                        {/if}
                    </ul>
                </div>
            </div>
        </div>
        <div class="bjui-moreSearch">
            <label>OID：</label><input type="text" id="customNo" value="{$keys.oid|default=''}" name="keys[oid]" class="form-control" size="6">&nbsp;
            <label>商品名称：</label><input type="text" value="{$keys.product|default=''}" name="keys[product]" class="form-control" size="12">&nbsp;
            <label>来路信息：</label><input type="text" value="{$keys.link|default=''}" name="keys[link]" size="20">&nbsp;
            <label>客户IP：</label><input type="text" value="{$keys.ip|default=''}" name="keys[ip]" size="12">&nbsp;
        </div>
    </form>
</div>
<div class="bjui-pageContent tableContent">
    <table class="table table-bordered table-hover table-striped table-top" data-selected-multi="false">
        <thead>
            <tr>
            {volist name="thead" id="val"}
                <th {notin name="$key" value="link,agent"}data-order-field="{$key}"{/notin}>{$val}</th>
            {/volist}
                <th width="26"><input type="checkbox" class="checkboxCtrl" data-group="ids" data-toggle="icheck"></th>
                <th width="60">操作</th>
            </tr>
        </thead>
        <tbody>
            {volist name="list" id="row"}
            <tr data-id="{$row.oid}">
                {volist name="thead" id="val"}
                <td>
                    {eq name="$key" value="ip"}
                    <a href="{:url('Order/blockIp',['ip'=>$row['ip']])}" data-toggle="doajax" style="color:#555;" data-reload="false" data-confirm-msg="禁止此IP:{$row[$key]}下单5天，确定吗？">{$row[$key]}</a>
                    {else/}
                    {in name="$key" value="link,agent"}{$row[$key]|raw}{else/}{$row[$key]}{/in}
                    {/eq}
                </td>
                {/volist}
                <td><input type="checkbox" name="ids" data-toggle="icheck" value="{$row.oid}"></td>
                <td>
                    {if authcheck('Admin/Order/del')}
                        <a href="{:url('Order/del',['key'=>'oid','val'=>$row['oid']])}" class="btn btn-red" data-reload="true" data-toggle="doajax" data-confirm-msg="确定要删除该行信息吗？">删除</a>
                    {/if}
                </td>
            </tr>
            {/volist}
        </tbody>
    </table>
</div>
<div class="bjui-pageFooter">
    <div class="pages">
        <span>每页&nbsp;</span>
        <div class="selectPagesize">
            <select data-toggle="selectpicker" data-width="50" data-toggle-change="changepagesize">
                <option value="20">20</option>
                <option value="40">40</option>
                <option value="60">60</option>
            </select>
        </div>
        <span>&nbsp;条，共 {$totalCount} 条</span>
    </div>
    <div class="pagination-box" data-toggle="pagination" data-total="{$totalCount}" data-page-size="20" data-page-current="{$pageCurrent}">
    </div>
</div>